<!DOCTYPE html>
<html lang="en">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <!-- Meta, title, CSS, favicons, etc. -->
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <title>铁路管理系统</title>

    <!-- Bootstrap -->
    <link href="static/vendors/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">
    <!-- Font Awesome -->
    <link href="static/vendors/font-awesome/css/font-awesome.min.css" rel="stylesheet">
    <!-- NProgress -->
    <link href="static/vendors/nprogress/nprogress.css" rel="stylesheet">
    <!-- iCheck -->
    <link href="static/vendors/iCheck/skins/flat/green.css" rel="stylesheet">
    <!-- bootstrap-wysiwyg -->
    <link href="static/vendors/google-code-prettify/bin/prettify.min.css" rel="stylesheet">
    <!-- Select2 -->
    <link href="static/vendors/select2/dist/css/select2.min.css" rel="stylesheet">
    <!-- Switchery -->
    <link href="static/vendors/switchery/dist/switchery.min.css" rel="stylesheet">
    <!-- starrr -->
    <link href="static/vendors/starrr/dist/starrr.css" rel="stylesheet">
    <!-- bootstrap-daterangepicker -->
    <link href="static/vendors/bootstrap-daterangepicker/daterangepicker.css" rel="stylesheet">

    <!-- Custom Theme Style -->
    <link href="static/build/css/custom.min.css" rel="stylesheet">
  </head>

  <body class="nav-md">
    <div class="container body">
      <div class="main_container">
        <div class="col-md-3 left_col">
          <div class="left_col scroll-view">
            <div class="navbar nav_title" style="border: 0;">
              <a href="{{ url_for('manager_bp.manager_index') }}" class="site_title"><i class="fa fa-university"></i> <span>SWJTU</span></a>
            </div>

            <div class="clearfix"></div>

            <!-- menu profile quick info -->
            <div class="profile clearfix">
              <div class="profile_pic">
                <img src="static/images/logo.png" alt="..." class="img-circle profile_img">
              </div>
              <div class="profile_info">
                <span>欢迎您,</span>
                <h2>{{ user_name }}</h2>
              </div>
            </div>
            <!-- /menu profile quick info -->

            <br />

            <!-- sidebar menu -->
            <div id="sidebar-menu" class="main_menu_side hidden-print main_menu">
              <div class="menu_section">
                <h3>管理员页面</h3>
                <ul class="nav side-menu">
                  <li><a><i class="fa fa-circle-thin"></i>线路<span class="fa fa-chevron-down"></span></a>
                    <ul class="nav child_menu">
                      <li><a href="{{ url_for('manager_bp.route_view') }}">查看线路</a></li>
                      <li><a href="{{ url_for('manager_bp.route_add') }}">添加线路</a></li>
                    </ul>
                  </li>
                  <li><a><i class="fa fa-circle"></i>车站<span class="fa fa-chevron-down"></span></a>
                    <ul class="nav child_menu">
                      <li><a href="{{ url_for('manager_bp.station_view') }}">查看车站</a></li>
                      <li><a href="{{ url_for('manager_bp.station_add') }}">添加车站</a></li>
                    </ul>
                  </li>
                  <li><a><i class="fa fa-circle-thin"></i>票务<span class="fa fa-chevron-down"></span></a>
                    <ul class="nav child_menu">
                      <li><a href="{{ url_for('manager_bp.ticket_view') }}">查看购票</a></li>
                      <li><a href="{{ url_for('manager_bp.ticket_edit') }}">进行购票</a></li>
                    </ul>
                  </li>
                  <li><a><i class="fa fa-circle"></i>车次<span class="fa fa-chevron-down"></span></a>
                    <ul class="nav child_menu">
                      <li><a href="{{ url_for('manager_bp.train_view') }}">查看车次</a></li>
                      <li><a href="{{ url_for('manager_bp.train_edit') }}">添加车次</a></li>
                    </ul>
                  </li>
                  <li><a><i class="fa fa-circle-thin"></i>用户<span class="fa fa-chevron-down"></span></a>
                    <ul class="nav child_menu">
                      <li><a href="{{ url_for('manager_bp.user_view') }}">查看用户</a></li>
                      <li><a href="{{ url_for('manager_bp.user_add') }}">添加用户</a></li>
                    </ul>
                  </li>
                  <li><a><i class="fa fa-circle"></i>管理员<span class="fa fa-chevron-down"></span></a>
                    <ul class="nav child_menu">
                      <li><a href="{{ url_for('manager_bp.staff_view') }}">查看管理员</a></li>
                      <li><a href="{{ url_for('manager_bp.staff_add') }}">添加管理员</a></li>
                    </ul>
                  </li>
                </ul>
              </div>
              <div class="menu_section">
                <h3>用户端</h3>
                <ul class="nav side-menu">
                  <li><a href="{{ url_for('user_bp.user_login') }}"><i class="fa fa-clone"></i>转至用户端</a></li>
                </ul>
              </div>

            </div>
            <!-- /sidebar menu -->

            <!-- /menu footer buttons -->
            <div class="sidebar-footer hidden-small">
              <a data-toggle="tooltip" data-placement="top" title="Logout" href="{{url_for('manager_bp.manager_logout')}}">
                <span class="glyphicon glyphicon-off" aria-hidden="true"></span>
              </a>
            </div>
            <!-- /menu footer buttons -->
          </div>
        </div>

        <!-- top navigation -->
        <div class="top_nav">
          <div class="nav_menu">
            <nav>
              <div class="nav toggle">
                <a id="menu_toggle"><i class="fa fa-bars"></i></a>
              </div>
            </nav>
          </div>
        </div>
        <!-- /top navigation -->

        <!-- page content -->
        <div class="right_col" role="main">
          <div class="">
            <div class="page-title">
              <div class="title_left">
                <h3> 
                  {% if user %} 
                    正在修改 {{ user.user_name }}
                  {% else %}
                    添加新管理员
                  {% endif %}
                  </h3>
              </div>
            </div>

            <div class="clearfix"></div>
            <div class="row">
              <div class="col-md-12 col-sm-12 col-xs-12">
                <div class="x_panel">
                  <div class="x_title">
                    <h2> 管理员<small> {{ user_name }} </small> </h2>                    
                    <ul class="nav navbar-right panel_toolbox">
                      <li><a class="collapse-link"><i class="fa fa-chevron-up"></i></a>
                      </li>
                      <li><a class="close-link"><i class="fa fa-close"></i></a>
                      </li>
                    </ul>
                    <div class="clearfix"></div>
                  </div>
                  <div class="x_content">
                    <br />

                    <form id="demo-form2" data-parsley-validate class="form-horizontal form-label-left" method="POST">

                      <div class="form-group">
                        <label class="control-label col-md-3 col-sm-3 col-xs-12" for="user_name">新用户名 <span class="required">*</span>
                        </label>
                        <div class="col-md-6 col-sm-6 col-xs-12">
                            {% if user %}
                          <input type="text" id="user_name" name="user_name" required="required" class="form-control col-md-7 col-xs-12" value="{{user.user_name}}" disabled=true>
                            {% else %}
                          <input type="text" id="user_name" name="user_name" required="required" class="form-control col-md-7 col-xs-12">
                            {% endif %}
                        </div>
                      </div>
                      <div class="form-group">
                        <label class="control-label col-md-3 col-sm-3 col-xs-12" for="password1"> 新密码 <span class="required">*</span>
                        </label>
                        <div class="col-md-6 col-sm-6 col-xs-12">
                          <input type="password" id="password1" name="password1" required="required" class="form-control col-md-7 col-xs-12">
                        </div>
                      </div>
                      <div class="form-group">
                        <label for="password2" class="control-label col-md-3 col-sm-3 col-xs-12">确认密码 <span class="required">*</span></label>
                        <div class="col-md-6 col-sm-6 col-xs-12">
                          <input type="password" id="password2" name="password2" required="required" class="form-control col-md-7 col-xs-12">
                        </div>
                      </div>
                      <div class="form-group">
                        <label class="control-label col-md-3 col-sm-3 col-xs-12">用户身份*</label>
                        <div class="col-md-6 col-sm-6 col-xs-12">
                            {% if type == 'edit' %}
                            <select id="identity" name="identity" class="form-control" required>
                              <option value="0" {% if user.department_type_number==0 %}selected{% endif %}>线路管理</option>
                              <option value="1" {% if user.department_type_number==1 %}selected{% endif %}>车站管理</option>
                              <option value="2" {% if user.department_type_number==2 %}selected{% endif %}>票务管理</option>
                              <option value="3" {% if user.department_type_number==3 %}selected{% endif %}>列车管理</option>
                              <option value="4" {% if user.department_type_number==4 %}selected{% endif %}>普通用户管理</option>
                            </select>
                            {% else %}
                            <select id="identity" name="identity" class="form-control" required>
                                <option value="0" >线路管理</option>
                                <option value="1" >车站管理</option>
                                <option value="2" >票务管理</option>
                                <option value="3" >列车管理</option>
                                <option value="4" >普通用户管理</option>
                              </select>
                            {% endif %}
                        </div>
                      </div>
                      <div class="ln_solid"></div>
                      <div class="form-group">
                        <div class="col-md-6 col-sm-6 col-xs-12 col-md-offset-3">
                          <button class="btn btn-primary" href="{{ url_for('manager_bp.user_view') }}" type="button">Cancel</button>
                          <button class="btn btn-primary" type="reset">Reset</button>
                          <button type="submit" class="btn btn-success">Submit</button>
                        </div>
                      </div>

                    </form>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
        <!-- /page content -->

        <!-- footer content -->
        <footer>
          <div class="pull-right"></div>
          <div class="clearfix"></div>
        </footer>
        <!-- /footer content -->
      </div>
    </div>

    <!-- jQuery -->
    <script src="static/vendors/jquery/dist/jquery.min.js"></script>
    <!-- Bootstrap -->
    <script src="static/vendors/bootstrap/dist/js/bootstrap.min.js"></script>
    <!-- FastClick -->
    <script src="static/vendors/fastclick/lib/fastclick.js"></script>
    <!-- NProgress -->
    <script src="static/vendors/nprogress/nprogress.js"></script>
    <!-- bootstrap-progressbar -->
    <script src="static/vendors/bootstrap-progressbar/bootstrap-progressbar.min.js"></script>
    <!-- iCheck -->
    <script src="static/vendors/iCheck/icheck.min.js"></script>
    <!-- bootstrap-daterangepicker -->
    <script src="static/vendors/moment/min/moment.min.js"></script>
    <script src="static/vendors/bootstrap-daterangepicker/daterangepicker.js"></script>
    <!-- bootstrap-wysiwyg -->
    <script src="static/vendors/bootstrap-wysiwyg/js/bootstrap-wysiwyg.min.js"></script>
    <script src="static/vendors/jquery.hotkeys/jquery.hotkeys.js"></script>
    <script src="static/vendors/google-code-prettify/src/prettify.js"></script>
    <!-- jQuery Tags Input -->
    <script src="static/vendors/jquery.tagsinput/src/jquery.tagsinput.js"></script>
    <!-- Switchery -->
    <script src="static/vendors/switchery/dist/switchery.min.js"></script>
    <!-- Select2 -->
    <script src="static/vendors/select2/dist/js/select2.full.min.js"></script>
    <!-- Parsley -->
    <script src="static/vendors/parsleyjs/dist/parsley.min.js"></script>
    <!-- Autosize -->
    <script src="static/vendors/autosize/dist/autosize.min.js"></script>
    <!-- jQuery autocomplete -->
    <script src="static/vendors/devbridge-autocomplete/dist/jquery.autocomplete.min.js"></script>
    <!-- starrr -->
    <script src="static/vendors/starrr/dist/starrr.js"></script>
    <!-- Custom Theme Scripts -->
    <script src="static/build/js/custom.min.js"></script>
	
  </body>
</html>
